Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
now-client
Advanced tools
DEPRECATED: Read more here.
The official JavaScript client for interacting with the now instant API (please note that this API only allows you to send strings, it doesn't support streaming - but binary files can be encoded as base64 strings).
Firstly, install the package using npm:
npm install --save now-client
Next, load it:
const NowClient = require('now-client')
Then initialize it:
<token>
holds your token, which can obtained here (optional, will read from ~/.now/auth.json
if not defined - you can also define it using the NOW_TOKEN
environment variable)<team>
specifies the ID of the team to which the actions should apply (optional)const now = new NowClient(<token>, <team>)
And finally, you can use its methods to retrieve data:
await now.getDeployments()
Kind: global class
Promise
Promise
Promise
Promise
Promise
Promise
Promise
Promise
Promise
Promise
Promise
Promise
Promise
Promise
Promise
Promise
Promise
Promise
Promise
Promise
Promise
Initializes the API. Looks for token in ~/.now.json if none is provided.
Param | Type | Description |
---|---|---|
[token] | String | Your now API token. |
Promise
Returns an array with all deployments.
Kind: instance method of Now
See: https://zeit.co/api#list-endpoint
Param | Type | Description |
---|---|---|
[callback] | function | Callback will be called with (err, deployments) |
Promise
Returns an object with deployment data.
Kind: instance method of Now
See: https://zeit.co/api#get-endpoint
Param | Type | Description |
---|---|---|
id | String | ID of deployment |
[callback] | function | Callback will be called with (err, deployment) |
Promise
Creates a new deployment and returns its data.
Kind: instance method of Now
See: https://zeit.co/api#instant-endpoint
Param | Type | Description |
---|---|---|
body | Object | The keys should represent a file path, with their respective values containing the file contents. |
[callback] | function | Callback will be called with (err, deployment) |
Promise
Deletes a deployment and returns its data.
Kind: instance method of Now
See: https://zeit.co/api#rm-endpoint
Param | Type | Description |
---|---|---|
id | String | ID of deployment |
[callback] | function | Callback will be called with (err, deployment) |
Promise
Returns an array with the file structure.
Kind: instance method of Now
See: https://zeit.co/api#file-structure-endpoint
Param | Type | Description |
---|---|---|
id | String | ID of deployment |
[callback] | function | Callback will be called with (err, fileStructure) |
Promise
Returns the content of a file either as string or object, depending on the filetype.
Kind: instance method of Now
See: https://zeit.co/api#file--endpoint
Param | Type | Description |
---|---|---|
id | String | ID of deployment |
fileId | String | ID of the file |
[callback] | function | Callback will be called with (err, fileContent) |
Promise
Returns an array with all domain names and related aliases.
Kind: instance method of Now
See: https://zeit.co/api#get-domains
Param | Type | Description |
---|---|---|
[callback] | function | Callback will be called with (err, domains) |
Promise
Adds a new domain and returns its data.
Kind: instance method of Now
See: https://zeit.co/api#post.domains
Param | Type | Description |
---|---|---|
domain | object | An object containing a string name and a boolean isExternalDNS |
[callback] | function | Callback will be called with (err) |
Promise
Deletes a domain name.
Kind: instance method of Now
See: https://zeit.co/api#delete-domains
Param | Type | Description |
---|---|---|
name | String | Domain name |
[callback] | function | Callback will be called with (err) |
Promise
Returns an array with all DNS records configured for a domain name.
Kind: instance method of Now
See: https://zeit.co/api#get-domain-records
Param | Type | Description |
---|---|---|
name | String | Domain name |
[callback] | function | Callback will be called with (err, domains) |
Promise
Adds a new DNS record for a domain.
Kind: instance method of Now
See: https://zeit.co/api#post-domain-records
Param | Type | Description |
---|---|---|
domain | String | Domain name |
recordData | object | An object containing a description of the new record according to the documentation. |
[callback] | function | Callback will be called with (err) |
Promise
Deletes a DNS record associated with a domain.
Kind: instance method of Now
See: https://zeit.co/api#delete-domain-records
Param | Type | Description |
---|---|---|
domain | String | Domain name |
recordId | String | Record ID |
[callback] | function | Callback will be called with (err) |
Promise
Returns an array of all certificates.
Kind: instance method of Now
See: https://zeit.co/api#get-certs
Param | Type | Description |
---|---|---|
[cn] | String | Common Name |
[callback] | function | Callback will be called with (err, certs) |
Promise
Creates a new certificate for a domain registered to the user.
Kind: instance method of Now
See: https://zeit.co/api#post-certs
Param | Type | Description |
---|---|---|
cn | String | Common Name |
[callback] | function | Callback will be called with (err) |
Promise
Renews an existing certificate.
Kind: instance method of Now
See: https://zeit.co/api#post-certs
Param | Type | Description |
---|---|---|
cn | String | Common Name |
[callback] | function | Callback will be called with (err) |
Promise
Replace an existing certificate.
Kind: instance method of Now
See: https://zeit.co/api#put-certs
Param | Type | Description |
---|---|---|
cn | String | Common Name |
cert | String | X.509 certificate |
key | String | Private key for the certificate |
ca | String | CA certificate chain |
[callback] | function | Callback will be called with (err, created) |
Promise
Deletes a certificate.
Kind: instance method of Now
See: https://zeit.co/api#delete-certs
Param | Type | Description |
---|---|---|
cn | String | Common Name |
[callback] | function | Callback will be called with (err) |
Promise
Returns an array with all aliases.
Kind: instance method of Now
See: https://zeit.co/api#user-aliases
Param | Type | Description |
---|---|---|
[id OR callback] | String | function | ID of deployment or callback |
[callback] | function | Callback will be called with (err, aliases) |
Promise
Creates an alias for the given deployment.
Kind: instance method of Now
See: https://zeit.co/api#create-alias
Param | Type | Description |
---|---|---|
id | String | ID of deployment |
alias | String | Hostname or custom url for the alias |
[callback] | function | Callback will be called with (err, data) |
Promise
Deletes an alias and returns a status.
Kind: instance method of Now
See: https://zeit.co/api#delete-user-aliases
Param | Type | Description |
---|---|---|
id | String | ID of alias |
[callback] | function | Callback will be called with (err, status) |
Promise
Returns an array with all secrets.
Kind: instance method of Now
See: https://zeit.co/api#get-now-secrets
Param | Type | Description |
---|---|---|
[id OR callback] | String | function | ID of deployment or callback |
[callback] | function | Callback will be called with (err, secrets) |
Promise
Creates a secret and returns its ID.
Kind: instance method of Now
See: https://zeit.co/api#post-now-secrets
Param | Type | Description |
---|---|---|
name | String | name for the secret |
value | String | value for the secret |
[callback] | function | Callback will be called with (err, data) |
Promise
Changes the name of the given secret and returns its ID and name.
Kind: instance method of Now
See: https://zeit.co/api#patch-now-secrets
Param | Type | Description |
---|---|---|
id | String | id or name of the secret |
name | String | new name for the secret |
[callback] | function | Callback will be called with (err, data) |
Promise
Deletes a secret and returns its ID.
Kind: instance method of Now
See: https://zeit.co/api#delete-now-secrets
Param | Type | Description |
---|---|---|
id | String | ID or name of the secret |
[callback] | function | Callback will be called with (err, status) |
FAQs
[![Join the community on GitHub Discussions](https://badgen.net/badge/join%20the%20discussion/on%20github/black?icon=github)](https://github.com/vercel/vercel/discussions)
The npm package now-client receives a total of 335 weekly downloads. As such, now-client popularity was classified as not popular.
We found that now-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 56 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.